package com.zky.gulimall.order.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Description 订单服务mybatis拦截器
 * @Author 张开源
 * @Date 2022/10/1 17:46
 * @Version 1.0
 **/
@Configuration
@EnableTransactionManagement
@MapperScan("com.zky.gulimall.order.dao")
public class MybatisConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor interceptor = new PaginationInterceptor();
        interceptor.setOverflow(true);
        interceptor.setLimit(1000);
        return interceptor;
    }
}
